package ui.activity.mine;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.TextView;

import net.ck.hzq.R;

import Utils.CheckPhoneNumberUtils;
import base.BaseAct;
import butterknife.BindView;
import event.NetErrorEvent;
import util.LogUtils;


/**
 * 关于我们
 * Created by chenjian on 2017/8/4.
 */

public class YinsiAct extends BaseAct {


    @BindView(R.id.webview)
    WebView webview;

    @Override
    protected void setRoot() {
        setContentView(R.layout.activity_yinsi);
    }

    @Override
    protected void setup() {
        setToolBar("隐私协议", "");
    }


    @Override
    protected void init(@Nullable Bundle savedInstanceState) {

        WebSettings webSettings = webview.getSettings();

        webSettings.setUseWideViewPort(true); //将图片调整到适合webview的大小
        webSettings.setLoadWithOverviewMode(true); // 缩放至屏幕的大小

        webSettings.setSupportZoom(false); //支持缩放，默认为true。是下面那个的前提。
//        webSettings.setBuiltInZoomControls(true);
        webSettings.setLoadsImagesAutomatically(true); //支持自动加载图片
        webSettings.setDefaultTextEncodingName("utf-8");
        webview.getSettings().setJavaScriptEnabled(true);
        webview.getSettings().setDomStorageEnabled(true);
        String url = "http://www.hftuoke.com/privacy.html";
        LogUtils.d(url);
        webview.loadUrl(url);
    }

    @Override
    public void onNetErrorEvent(NetErrorEvent event) {
        super.onNetErrorEvent(event);
    }

    @Override
    protected void onNetError(NetErrorEvent event) {

    }



}
